/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package daw.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Christian
 */
@Embeddable
public class DelitoSubdelitoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idDelito")
    private int idDelito;
    @Basic(optional = false)
    @Column(name = "idSubDelito")
    private int idSubDelito;

    public DelitoSubdelitoPK() {
    }

    public DelitoSubdelitoPK(int idDelito, int idSubDelito) {
        this.idDelito = idDelito;
        this.idSubDelito = idSubDelito;
    }

    public int getIdDelito() {
        return idDelito;
    }

    public void setIdDelito(int idDelito) {
        this.idDelito = idDelito;
    }

    public int getIdSubDelito() {
        return idSubDelito;
    }

    public void setIdSubDelito(int idSubDelito) {
        this.idSubDelito = idSubDelito;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idDelito;
        hash += (int) idSubDelito;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DelitoSubdelitoPK)) {
            return false;
        }
        DelitoSubdelitoPK other = (DelitoSubdelitoPK) object;
        if (this.idDelito != other.idDelito) {
            return false;
        }
        if (this.idSubDelito != other.idSubDelito) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "daw.bean.DelitoSubdelitoPK[idDelito=" + idDelito + ", idSubDelito=" + idSubDelito + "]";
    }

}
